<?php

/**
 * UserIdentity represents the data needed to identity a user.
 * It contains the authentication method that checks if the provided
 * data can identity the user.
 */

class WebUser extends CWebUser
{
    public function __get($name)
    {
        if ($this->hasState('__userInfo')) {
            $user=$this->getState('__userInfo',array());
            if (isset($user->$name)) {
                return $user->$name;
            }
        }
 
        return parent::__get($name);
    }
 
    public function login($identity, $duration) {
       // $this->setState('__userInfo', $identity);
        parent::login($identity, $duration);
    }
}
?>